import React from 'react'
import { Route, NavLink, Switch} from 'react-router-dom'

// 引入二级路由页面
import Films from './Films'
import Cinemas from './Cinemas'
import Center from './Center'

const Home = () => {
  return (
    <div className='page_home'>
      <div className='page_home_view'>
        <Switch>
          <Route path='/films' component={ Films }></Route>
          <Route path='/cinemas' component={ Cinemas }></Route>
          <Route path='/center' component={ Center }></Route>
        </Switch>
      </div>
      <div className='page_home_tabbar'>
        <ul>
          <li><NavLink to='/films'>影片</NavLink></li>
          <li><NavLink to='/cinemas'>影院</NavLink></li>
          <li><NavLink to='/center'>我的</NavLink></li>
        </ul>
      </div>
    </div>
  )
}

export default Home